// 组件少的分类都在common
// 指标管理indicator.js
// 操作风险管控operation.js
// 系统管理system.js
import Vue from 'vue';
import Router from 'vue-router';
import common from './common.js';
import home from '../components/home.vue';
import login from '../page/common/login.vue';
import indicator from './indicator.js';
import operation from './operation.js';
import system from './system.js';
Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/home',
      component: home,
      children: [].concat(common,indicator,operation,system),
    },
    {
      path: '/',
      name: 'login',
      component: login,
    }
  ],
  scrollBehavior (to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      document.scrollingElement.scrollTop = 0;
    }
  }
});


